package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.OGameruleDao;
import com.xyz.domain.table.OGamerule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OGameruleLogic {

    @Autowired
    private OGameruleDao oGameruleDao;

    public OGamerule add(OGamerule oGamerule){
        return oGameruleDao.insert(oGamerule);
    }

    public Integer update(OGamerule oGamerule){
        return oGameruleDao.update(oGamerule);
    }

    public List<OGamerule> list(OGamerule oGamerule, String orderBy){
        return oGameruleDao.selectList(oGamerule, orderBy);
    }

    public Integer delete(Integer key){
        return oGameruleDao.delete(key);
    }

    public PageResponseModel<OGamerule> pageInfo(OGamerule oGamerule, String orderBy, Integer pageNo, Integer pageSize){
        return oGameruleDao.selectByPageNo(oGamerule, orderBy, pageNo, pageSize);
    }

}